<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<script type="text/javascript" src="script/project.js"></script>-->
<script type="text/javascript">
function vpSum(){
	var vpKindAndScore=document.getElementById("vpKindAndScore").value;
	var vpItem = vpKindAndScore.split(",");  // split 함수사용..
	var vpKind = vpItem[0];   // 잘라진 값 배열..
	document.getElementById("vp_kind").value=vpKind;
	var vpScore = parseFloat(vpItem[1]);
	document.getElementById("vp_score").value=vpScore;
	var v_statusScore= parseFloat(document.getElementById("v_status").value);
	sum=vpScore*v_statusScore;
	document.getElementById("vp_total").value=sum;
}
</script>
</head>
<body onload="javascript: moveInsertPage('mbbtlist','${requestScope.update }'); javascript: vpSum();">
<div class="box">
      		<h4 class="white">
      			<span class="align-left">기존 보안통제 효과성평가</span>
	      		<span class="align-right">마감상태(위험수준평가) :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[4].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
      		
      		
      		<table class="insertTableL" style="width: 713px">
	   			<tfoot>
	   				<tr>
	   					<td>
	                     	<div class="align-right">
	                     	<c:choose>
	                       		<c:when test="${sessionScope.magamSession[4].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                  			   	<a href="#" class="button" onclick="javascript: riskIWrite('mbbtlist'); return false;"><span>저장</span></a>
	                       		</c:when>
	                       		<c:otherwise>
	                       			<a href="#" class="button1 addMargin" onclick="return false;"><span>저장</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
	                     	<a href="#" class="button" onclick="javascript: riskICancleWrite('mbbtlist')"><span>닫기</span></a></div>
	                     </td>
	   				</tr>
	   			</tfoot>
	   		</table>
	   		
	 <div class="box-container2" style="height: 520px; overflow: auto; overflow-x: hidden;">
		 <form action="riskIAction.do" method="post" name="mbbtlist">
			  <input type="hidden" name="mode" value="mbbtlist_update"></input>
			  <input type="hidden" name="v_id" id="insertNum" value="${requestScope.vo.v_id }"></input>
			 <input type="hidden" name="pro_id" id="pro_id" value="${sessionScope.lastProId }"></input>
			  <input type="hidden" name="ts_cd1" id="ts_cd1" value="${requestScope.vo.ts_cd1}"></input>
			 <input type="hidden" name="ts_cd2" id="ts_cd2" value="${requestScope.vo.ts_cd2 }"></input>
			 <input type="hidden" name="ts_cd3" id="ts_cd3" value="${requestScope.vo.ts_cd3 }"></input>
			 <input type="hidden" name="ts_cd4" id="ts_cd4" value="${requestScope.vo.ts_cd4 }"></input>
			 <input type="hidden" name="v_nm" id="v_nm" value="${requestScope.vo.v_nm }"></input>
			 <input type="hidden" name="vp_kind" id="vp_kind" value="${requestScope.vo.vp_kind }"></input>
        	<input type="hidden" name="v_gubun" id="v_gubun" value="${requestScope.v_gubun }"></input>
	   		<table class="insertTableL" style="width: 713px">
	   			<colgroup>
	   				<col width="110px"/>
	   				<col width=""/>
	   			</colgroup>
	   			<tbody>
	   				<tr>
	   					<td class="titleName">통제구분</td>
	   					<td>
							 ${requestScope.vo.ts_nm1 }
						</td>
	   				</tr>
	   				<tr>
	   					<td class="titleName">통제영역</td>
	   					<td>
							 ${requestScope.vo.ts_nm2 }
						</td>
	   				</tr>
	   				<tr>
	   					<td class="titleName">통제항목</td>
	   					<td>
	   						${vo.ts_nm3 }
						</td>
	   				</tr>
	   				<tr>
	   					<td class="titleName">통제<br/>세부항목</td>
	   					<td class="col-rowspanMid">
	   						${vo.ts_nm4 }
						</td>
	   				</tr>
	   				<%--
	   				<tr>
						<td class="titleName" class="col-rowspanMid">연관자산유형</th>
						<td>
							<div>
								<span><input type="checkbox" name="connA01" id="connA01" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA01 == 1 }">checked="checked"</c:if>></input> <label for="connA01" style="cursor:pointer">HW</label></span>
								&nbsp;
								<span><input type="checkbox" name="connA03" id="connA03" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA03 == 1 }">checked="checked"</c:if>></input> <label for="connA03" style="cursor:pointer">보안</label></span>
								<span><input type="checkbox" name="connA05" id="connA05" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA05 == 1 }">checked="checked"</c:if>></input> <label for="connA05" style="cursor:pointer">상용</label></span>
								<span><input type="checkbox" name="connA07" id="connA07" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA07 == 1 }">checked="checked"</c:if>></input> <label for="connA07" style="cursor:pointer">저장</label></span>
								<span><input type="checkbox" name="connA09" id="connA09" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA09 == 1 }">checked="checked"</c:if>></input> <label for="connA09" style="cursor:pointer">건물</label></span>
							</div>
							<div>
								<span><input type="checkbox" name="connA02" id="connA02" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA02 == 1 }">checked="checked"</c:if>></input> <label for="connA02" style="cursor:pointer">NW</label></span>
								&nbsp;
								<span><input type="checkbox" name="connA04" id="connA04" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA04 == 1 }">checked="checked"</c:if>></input> <label for="connA04" style="cursor:pointer">응용</label></span>
								<span><input type="checkbox" name="connA06" id="connA06" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA06 == 1 }">checked="checked"</c:if>></input> <label for="connA06" style="cursor:pointer">이동</label></span>
								<span><input type="checkbox" name="connA08" id="connA08" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA08 == 1 }">checked="checked"</c:if>></input> <label for="connA08" style="cursor:pointer">인적</label></span>
								<span><input type="checkbox" name="connA10" id="connA10" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connA10 == 1 }">checked="checked"</c:if>></input> <label for="connA10" style="cursor:pointer">장비</label></span>
							</div>
						</td>
					</tr>
					<tr>
						<td class="titleName">연관위협유형</th>
						<td>
							<span><input type="checkbox" name="connT1" id="connT1" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connT1 == 1 }">checked="checked"</c:if>></input> <label for="connT1" style="cursor:pointer">재해</label></span>
							<span><input type="checkbox" name="connT2" id="connT2" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connT2 == 1 }">checked="checked"</c:if>></input> <label for="connT2" style="cursor:pointer">운영</label></span>
							<span><input type="checkbox" name="connT3" id="connT3" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connT3 == 1 }">checked="checked"</c:if>></input> <label for="connT3" style="cursor:pointer">테러</label></span>
							<span><input type="checkbox" name="connT4" id="connT4" style="cursor:pointer" value='1' <c:if test="${requestScope.vo.connT4 == 1 }">checked="checked"</c:if>></input> <label for="connT4" style="cursor:pointer">불법</label></span>
						</td>
					</tr>
					 --%>
					<tr>
						<td class="titleName" class="col-rowspanMid">취약성 평가 항목</td>
						<td>
							<textarea class="read_textfiled" name="vp_item" rows="4" id="vp_item" readonly="readonly">${vo.vp_item }</textarea>
						</td>
					</tr>
					<tr>
						<td class="titleName" class="col-rowspanMid">모범관행</td>
						<td>
							<textarea class="read_textfiled" name="good_model" rows="4"  id="good_model" readonly="readonly">${vo.good_model }</textarea>
						</td>
					</tr>
	   			</tbody>
	   		</table>
	   		<table class="insertTableL" style="width: 713px">
	   			<tfoot>
	   				<tr>
	   					<td>
	                     	<div class="align-left subjectTitle"> ■ 항목중요도</div>
	                     </td>
	   				</tr>
	   			</tfoot>
	   		</table>
	   		<table class="insertTableL" style="width: 713px">
	   			<colgroup>
	   				<col width="110px"/>
	   				<col/>
	   			</colgroup>
	   			<tbody>
					<tr>
						<td class="titleName">항목중요도</td>
						<td>
							<select name="v_status" id="v_status" class="selectBox">
								<option value="${vo.v_status }">${vo.v_status }</option>
							</select>
						</td>
					</tr>
					<tr>
						<td class="titleName" class="col-rowspanMid">취약점 상세</td>
						<td>
							<textarea class="read_textfiled" name="v_detail" rows="4"  id="v_detail" readonly="readonly">${vo.v_detail }</textarea>
						</td>
					</tr>
	   			</tbody>
	   		</table>
	   		<table class="insertTableL" style="width: 713px">
	   			<tfoot>
	   				<tr>
	   					<td>
	                     	<div class="align-left subjectTitle"> ■ 항목평가</div>
	                     </td>
	   				</tr>
	   			</tfoot>
	   		</table>
	   		<table class="insertTableL" style="width: 713px">
	   			<colgroup>
	   				<col width="110px"/>
	   				<col width=""/>
	   				<col width="110px"/>
	   				<col width=""/>
	   			</colgroup>
	   			<tbody>
					<tr>
						<td class="titleName">구분</td>
						<td>
							<select name="vpKindAndScore" id="vpKindAndScore" class="selectBox" onchange="javascript: vpSum()">
								<c:forEach  var="vpScoreList" items="${requestScope.vpScoreList}" varStatus="status">
									<option <c:if test="${vpScoreList.base_lev2 == requestScope.vo.vp_kind }">selected</c:if> value="${vpScoreList.base_lev2 },${vpScoreList.base_cnt }">${vpScoreList.base_lev2 }</option>
								</c:forEach>
							</select>
						</td>
						<td class="titleName">평점</td>
						<td>
							<input type='text' name='vp_score' id='vp_score' size="3" readonly="readonly"></input>
						</td>
					</tr>
					<tr>
						<td class="titleName" class="col-rowspanMid">최종점수</td>
						<td colspan="3">
							<input type='text' name='vp_total' id='vp_total' size="3" readonly="readonly"></input>
						</td>
					</tr>
	   			</tbody>
	   		</table>
	   		<table class="insertTableL" style="width: 713px">
	   			<tfoot>
	   				<tr>
	   					<td>
	                     	<div class="align-left subjectTitle"> ■ 기존보안통제</div>
	                     </td>
	   				</tr>
	   			</tfoot>
	   		</table>
	   		<table class="insertTableL" style="width: 713px">
	   			<colgroup>
	   				<col width="110px"/>
	   				<col width=""/>
	   			</colgroup>
	   			<tbody>
					<tr>
						<td class="titleName">통제제도</td>
						<td>
							 <input type="text" name="control_rule" id="control_rule" value="${vo.control_rule }" maxlength="100" class="width99"></input>
						</td>
					</tr>
					<tr>
						<td class="titleName">통제도구</td>
						<td>
							 <input type="text" name="control_tool" id="control_tool" value="${vo.control_tool }" maxlength="100"  class="width99"></input>
						</td>
					</tr>
	   			</tbody>
	   		</table>
   		</form>
	</div>
</div>
</body>
</html>
